﻿<%@ Page Language="C#" MasterPageFile="~/Manage/MainPage.master"  AutoEventWireup="true" CodeFile="CommendManage.aspx.cs" Inherits="Manage_CommendManage" %>
<%@ Import Namespace="Shopping.Common" %>
<%@ Import Namespace="Shopping.Model" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Content" Runat="Server">
<script type="text/javascript" src="/JsBase/swfupload/swfupload.js"></script> 
<script type="text/javascript" src="/JsBase/swfupload/SwfUploadHelper.js"></script> 
<script type="text/javascript" src="/Manage/Js/CommendManage.js"></script>
<script type="text/javascript" src="/Manage/Public/SelectGoods.js"></script>
<script type="text/javascript">
   ModelOfGoodsCommend = <%=new GoodsCommend().ToJsonString() %>;
   SelectOptionOfCategory = '<%=SelectOptionOfCategory %>';
   ModelOfIDNameObj =<%=new IDNameObj().ToJsonString() %>
   SessionID = '<%=Session.SessionID %>';
</script>

<table width="99%" border="0" cellspacing="0" cellpadding="0" class="table" align="center">
  <tr>
    <td align="center"><img src="/Manage/Images/sousuo.gif" />商品名称：
      <input name="txtKeyWords" type="text" id="txtKeyWords" size="40"  class="border6" value="<%=q.KeyWords %>" />
      &nbsp;推荐栏目：
      <select name="ddlCategoryIDOfSearch" id="ddlCategoryIDOfSearch">
  <option value="">--不限--</option>
  <%=SelectOptionOfCategory %>
</select>
&nbsp;
<input name="btnSearch" type="button" id="btnSearch" value="执行搜索" class="btn2" onclick="GoToSearch();" />
&nbsp;&nbsp; [ <a href="CommendManage.aspx" class="red bold">查看全部</a> ] </td>
  </tr>
</table>
  <br />
<table width="99%" border="0" cellspacing="0" cellpadding="0" class="table" align="center">
  <tr>
    <td colspan="7" align="left" class="HeadTitle">&gt;&gt;商品推荐管理</td>
  </tr>
  <tr  class="TableHeadRow">
    <td width="80" align="center">编号 </td>
    <td align="left">商品名称</td>
    <td align="left" >推荐标题</td>
    <td width="90" align="center">排序值</td>
    <td width="120" align="center">推荐日期</td>
    <td  align="center">推荐栏目</td>
    <td width="120" align="center">管理 [<a href="javascript:Add();" class="red">+添加推荐</a>] </td>
  </tr>
  <%
      if (listOfData != null)
      {
          for (int i = 0; i < listOfData.Count; ++i)
          {
              GoodsCommendInfo d = listOfData[i]; 
  %>
  <tr onmouseover="this.style.backgroundColor='#F2F2F2';" onmouseout="this.style.backgroundColor='#FFFFFF';" >
    <td align="center"><%=(q.CurPage-1)*q.PageSize +i+1 %>.</td>
    <td align="left"><a href="/Show.aspx?GoodsID=<%=d.CommendInfo.GoodsID %>" target="_blank"><%=d.GoodsName %></a></td>
    <td align="left" title="<%=d.CommendInfo.CommendMemo %>"><%=d.CommendInfo.CommendTitle %></td>
    <td align="center" class="green bold"><%=d.CommendInfo.OrderValue %></td>
    <td align="center"><%=d.CommendInfo.CommendDate.ToString("yyyy-MM-dd HH:mm:ss") %></td>
    <td align="center"><a href="<%=Utility.GetNewUrl("CategoryID",d.CommendInfo.CategoryID.ToString(),false) %>" title="查看该推荐下所有商品"> <%=d.CategoryName %></a></td>
    <td align="center">[ <a href="javascript:Edit(<%=d.CommendInfo.GoodsCommendID %>);" class="green bold">编辑</a> ]
     [ <a href="javascript:Delete(<%=d.CommendInfo.GoodsCommendID %>);" class="red">删除</a> ] </td>
  </tr>
  <%} %>
  <tr>
    <td colspan="7" align="center">
     <span class="page" >
         <%=Utility.GetPageLine(Utility.GetWebPageUrlNoCurPage(), q.CurPage, q.PageSize, 10,q.TotalCount)%>        </span>
    </td>
    </tr>
  <%
      }
      else
      { %>
  <tr>
    <td colspan="7" align="center"><span class="red">[ 未找到任何商品推荐信息！]</span></td>
    </tr>
    <%} %>
</table>

</asp:Content>
